473,538 Members | 10,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

redirect url using javascript in drop down list

Sirs

How can i use javascript to redirect the url in the drop list box once the
event onchnage is triggered?
Jul 23 '05 #1
1 8200
In article <xfJad.718118$gE.53400@pd7tw3no>, ti******@shaw.ca enlightened us
with...
Sirs

How can i use javascript to redirect the url in the drop list box once the
event onchnage is triggered?


<select onChange="goThere(this.options[this.selectedIndex].value)" name="s1">
<option value="http://someurl.com">place1</option>
<option value="http://someurl2.com">place2</option>
<option value="http://someur3.com">place3</option>
</select>

<script type="text/javascript">
function goThere(loc)
{
window.location.href=loc;
}
</script>

Oh, and I'm a 'miss', thank you. ;)

--
--
~kaeli~
The Bible contains six admonishments to homosexuals and
three hundred sixty-two admonishments to heterosexuals.
That doesn't mean that God doesn't love heterosexuals. It's
just that they need more supervision.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
12449
by: Dharmen | last post by:
Hey Guys, I have a SQL database called price and a table called TB1, in it i have a column called "loc" I want to display the tiems in "loc" in a drop down list. I am able to do this in a datagrid. This is the code im using to display in datagrid: SqlConnection Conn=new SqlConnection("Data Source=localhost;Database=price; Integrated...
4
1315
by: fazee.ent | last post by:
i am using a drop down list and have sucessfuly populated it proble is this i have set DataValueField = "cat_id" but value for dropdownlist appears a string "cat_id" instead of numer value of cat_id plz help me Faisal Iqbal Ch
5
18708
by: ashok893 | last post by:
I'm using two drop down list ina form. I have generated the first drop down list from MySQL database. When i select an option from first drop down list, i have to generate second drop down list options by the selected value of first drop down list from MySQL database. For example, the first drop down list contains Animals, Birds... If i select...
2
6914
by: kalaivanan | last post by:
hi, i am developing web application using c#. in a particular page i am using two drop down list boxes, one for product and the other for corresponding models of a product. whenever i select a product the corresponding models will be populated in the model drop down list. and i am using ajax for populating the model ddl. hence the model ddl...
1
1243
by: YASIN786 | last post by:
hi all dis yasin<yasinkoraya@yahoo.com> i am creating a web site for a company at the moment. this is the scenario: the company has many stores throughtout the country. on the home page they expect to see a dropdownlist box/ combo box which has the names of their stores. if one of the entries is clicked it should open another webform/web page...
2
4483
by: NickMc71 | last post by:
Hello, I have the following JS code: function MM_load() { var x=document.getElementsByName("newDDL"); for(var i=0;i<=x.length-1;i=i+1) {
5
1932
by: dmj07 | last post by:
Hi all, I would like to know a way to add a label to an update panel by using a drop down list selected item. For example: There is a list of items in a drop down list, the user selects one then presses the add button next to it and it creates a label in a table next to it. Here is the code I have at the moment:
7
5010
by: coolnags | last post by:
Hi, As we know IE SELECTdrop down list has limitations on tool tip on individual option items and also horizontal scroll bar. Can any one please tell any other alternative to show the tool tip using javascript or has any one implemented drop down list using div which has all the functionalites of drop down list. Thanks, Nags
0
1316
by: StarLavender | last post by:
Hi. I want to create a search form using the drop down list and checkbox. First, the users have to select from drop down list whether they want to search by date or id. After that, for example, a new pair of drop down list will display for the users to choose the start date and end date. Second, the users have to check the checkbox to make sure...
0
1371
by: Gary Tan | last post by:
Hi i am working on a asp.net website which would route a path on a Google map using 2 drop-down list(departure country and destination country) and a button,database connection is already done,coding to draw the path too.I have troubles trying to make the drop-down list work with the button,by clicking the button,it will create a path between the...
0
7365
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7308
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7536
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7650
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5226
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3354
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
933
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
594
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.